module.exports = {
  module: {
    rules: [
      {
        test: /\.(js|jsx)$/,
        // 才能支持import,支持jsx
        loader: "babel-loader",
        exclude: /node-modules/,
        options: {
          presets: ['@babel/preset-react', ['@babel/preset-env']]// 支持es6最新的语法
        }
      },
    ]
  }
}